package com.liqi.display.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.liqi.display.entity.SystemParam;
import com.liqi.display.mapper.SystemParamMapper;
import com.liqi.display.service.ISystemParamService;

/**
 * 系统参数
 * @author Administrator
 * 20211216
 */
@Service
public class SystemParamServiceImpl extends ServiceImpl<SystemParamMapper, SystemParam> implements ISystemParamService {
	
	@Autowired
	SystemParamMapper systemParamMapper;

	/**
	 * desc:根据参数名称查询
	 * @param paramName
	 * @return
	 */
	@Override
	@DS("bigProject")
	public List<SystemParam> getSystemParamByName(String paramName) {
		return systemParamMapper.getSystemParamByName(paramName);
	}

	/**
	 * desc:根据参数名称查询参数值
	 * @param paramName
	 * @return
	 */
	@Override
	@DS("bigProject")
	public String getValueByName(String paramName) {
		return systemParamMapper.getValueByName(paramName);
	}

	/**
	 * desc:根据参数名称查询
	 * @return
	 */
	@Override
	@DS("bigProject")
	public List<SystemParam> getSystemParamByType(Integer paramType) {
		return systemParamMapper.getSystemParamByType(paramType);
	}

	/**
	 * 修改 系统参数表对应的实体
	 * @param systemParam
	 * @return
	 */
	@Override
	@DS("bigProject")
	public int updateSystemParam(SystemParam systemParam) {
		return systemParamMapper.updateSystemParam(systemParam);
	}


}
